package star.crust.cartspace.framework;

import java.io.File;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;

import org.w3c.dom.Document;
import org.w3c.dom.Element;

public class CrtModelLoader {
	private File docFile = null;
	private Document doc = null;

	public CrtModelLoader() {
		
	}
	
	public void open(String fileName) {
		docFile = new File(fileName);
		if(! docFile.exists()) {
			System.out.println("Can't find the file: " + fileName);
			return;
		}
		try {
			DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
			DocumentBuilder db = dbf.newDocumentBuilder();
			doc = db.parse(docFile);
		} catch (Exception e) {
			System.out.print("Problem parsing the file.");
			return;
		}
	}
	public void loadModel(CrtBodyGroup bodyGroup) {

	}
}
